package group;

import org.eclipse.swt.SWT;
import org.eclipse.swt.layout.FillLayout;
import org.eclipse.swt.layout.FormLayout;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Group;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.Text;

public class GroupEx {

	public GroupEx() {
		Display display = new Display();
		Shell shell = new Shell(display);
		shell.setSize(600, 400);
		shell.setLayout(new GridLayout(1,true));
		
		final Composite comp=new Composite(shell,SWT.BORDER);
		comp.setLayout(new GridLayout(2,true));
		//comp.setSize(500,400);
		
		Group group0 = new Group(comp, SWT.NULL);
		group0.setLayout(new GridLayout(3,true));
		group0.setText("抓图路径设置");
		
		Label label = new Label(group0, SWT.NULL);
		label.setAlignment(SWT.CENTER);
		label.setText("抓图路径：");
		
		Text text=new Text(group0,SWT.BORDER);
		
		Button button=new Button(group0,SWT.BORDER);
        button.setText("选择路径");
		
		Group group1 = new Group(comp, SWT.NULL);
		//group1.setText("SWT.NULL");
		group1.setText("抓图设置");

		//shell.pack();
		shell.open();

		while (!shell.isDisposed()) {
			if (!display.readAndDispatch()) {
				display.sleep();
			}
		}
		display.dispose();
	}

	public static void main(String[] args) {
		new GroupEx();
	}
}